\documentclass[a4paper,11pt]{article}
\usepackage{graphicx}
\usepackage{multicol,color}

%opening
\title{Mobile Computing - The Miniproject Bluetooth Pacman}
\author{Mateusz Brozyna - Florian Matt }
\date{November 2007}

\begin{document}


\maketitle
\newpage
\tableofcontents
\newpage

\section{Why we have chosen Pacman}

The main reason for choosing Pacman as our mobile computing project
was because it was the most popular arcade game of 80's and both us
were spending a lot of time in our childhoods playing it.

Moreover we thought that this game was implemented on so many platforms
and by enormous amount of programmers all over the world so we thought
why not trying to make our own mobile phone version.

\section{Introduction to the Problem}

In this chapter we will cover briefly the history of the pacman and we
will also mention the historical pacman rules, which were analyzed by
us and slightly changed.

\subsection{History of the Pacman}

Pacman  was developed and first released in Japan  by Japanese company Namco. On the 22nd of  May 1980 the first pacman was sold publicly.
Below you may see picture of the first pacman box.


\begin{center}
\includegraphics{1.eps}
\end{center}


As you may see the Pacman is pronounced differently Puck Man. That was the original name of the game on the American market. It was however changed very fast as it was thought that vandals might change the first P letter into F letter thus changing the meaning of Puck Man dramatically.

The main programmer of that game was a Japanese employee of Namco company. He was the main programmer of the Pacman game. He developed his solution to stand alone application in eighteen months. Below you may see the picture of the Toru Iwatani who was the Pacman programmer.
\begin{center}
\includegraphics{2.eps}
\end{center}

\subsection{Pacman rules}
We have based our solution on the historical Pacman game play. Therefore we would like to bring those rules closer to you.

The first and the most important concept of the game is concept of the creature called Pacman. It lives in the virtual maze and it survives there by gathering coins. When it eats all of the coins it may move  to the next stage of the game.

However life of this creature in this Labyrinth is not so easy. Pacman has to run away and hide from Ghosts. Ghosts are malicious monsters who are looking for pacman day in day out. When they find him they chase him as long as needed to catch him. When Pacman is caught it dies. Luckily pacman has more then one life and moreover it may obtain new life by gathering 10000 points.

\begin{center}
\includegraphics{3.eps}
\end{center}

On the above picture you may see four ghosts which were historically implemented in the first pacman version. Those Ghosts are as follows: Blinky, Pinky, Inky, Clyde.

I would like to say a few words about the items that are gathered by the pacman. There three types of them.

\begin{itemize}
\item  \textbf{coins} - are items which give a certain amount of points to the final score
\item  \textbf{energizers} - are items which have special influence on the behaviour of the Pacman/ After eating one of them pacman becomes the ability to eat ghosts. Moreover ghosts are moving at that time slower so that pacman can eliminate them easily.
\item  \textbf{fruits} - are items with different functionalities. For example one of them can can higher the score by a certain amount while others can give a additional life
\end{itemize}

\subsection{Bluetooth Pacman game rules}
Our version of pacman has been derived from the first version of pacman. However we have introduced some innovations in our project. First of all in our version of game there are two Pacmans. Those creatures are simply opponents who are fighting against each other. Both of them are situated in a imaginary maze. In our version of pacman there are only two types of coins. Normal coins which give 1 point to the score and bonus coins which give two points to the score. We made so because our solution has two work over the bluetooth. So we needed some kind of interaction. Furthermore game can be started in two modes. Client mode or server mode.

\section{Solution}
In this chapter you may find the description of the most interesting and crucial parts of our solution.

\subsection{The concept of the Labyrinth}

In our solution the maze is represented as a two dimensional array. As shown below.
\begin{center}
\includegraphics[width=12cm]{4.eps}
\end{center}


As we can see from the above picture every single digit has a meaning in our solution. The meanings of the digits are as follows:
\\

\textbf{1} – represents the wall\\
\textbf{2,5} – represents normal coins and bonus coins.\\
\textbf{3,4} – represents opponents \\
\textbf{0} – represent empty space \\


This architectural approach allows us to make our solution more scalable. We can for example add new levels just by making new two dimensional arrays. In addition new  items to collect can be also introduced by adding new numbers on the board.

\subsection{Networking and Bluetooth}

There are two modules which can be chosen from the main menu. Server and client module. 
\\
\begin{center}
\includegraphics{5.eps}
\end{center}
In first case the mobile phone becomes a server and it waits until someone makes a connection. In the second case user becomes a client and it looks for a server to connect with.




\end{document}
